<?php

session_start();
if(isset($_SESSION['Name'])){

include("Design.php");
$name = $_SESSION['Name'];
Top2($name);
$rm = $_REQUEST['rm'];
if(isset($rm)){}
echo "<table><tr><th>Date</th><th>BMI</th><th>Weight</th><th>Height</th></tr>";
include("DB.class.php");
$DB = new DB();	
$rs=$DB->GetDetail($rm);	
while ($current=mysql_fetch_array($rs)){ 
		echo "<tr>";
			echo "<td>";
			echo $current["Date"];
			echo "</td>";
			echo "<td>";
			echo number_format($current["BMI"],2);
			echo "</td>";
			echo "<td>";
			echo $current["Weight"];
			echo "</td>";
			echo "<td>";
			echo $current["Height"];
			echo "</td>";
			echo "</tr>";			
		}
		
		echo "</table>";




	?>
</body>
</html>
<?php
}



else header('Location: index.php');